package com.example.cloudcommon.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Schema(example="IdcOperateLogEntity Ck", description="IdcOperateLogEntity Ck")
@TableName("idc_operate_log")
public class IdcOperateLog {

    @Schema(description  = "模块 id")
    @TableId(value = "ID", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description  = "模块 系统名")
    @TableField("MODULE")
    private String module;

    @Schema(description  = "方法名 有api注解则展示，无则展示方法名")
    @TableField("METHOD")
    private String method;

    @Schema(description  = "用户ID")
    @TableField("USER_ID")
    private Integer userId;

    @Schema(description  = "用户名")
    @TableField("USER_NAME")
    private String userName;

    @Schema(description  = "参数")
    @TableField("PARAMS")
    private String params;

    @Schema(description  = "处理是否异常")
    @TableField("RESULT_CODE")
    private Integer resultCode;

    @Schema(description  = "返回结果信息")
    @TableField("RESULT_MSG")
    private String resultMsg;

    @Schema(description  = "IP")
    @TableField("IP")
    private String ip;

    @Schema(description  = "处理时间")
    @TableField("ELPSE_TIME")
    private Long elpseTime;

    @Schema(description  = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

}
